﻿/*
 * Created by SharpDevelop.
 * User: Administrator
 * Date: 2019/9/7
 * Time: 10:49
 * 
 * To change this template use Tools | Options | Coding | Edit Standard Headers.
 */
using System;
using System.Windows.Forms;

namespace QStarter
{
	/// <summary>
	/// Class with program entry point.
	/// </summary>
	internal sealed class Program
	{
		/// <summary>
		/// Program entry point.
		/// </summary>
		[STAThread]
		private static void Main(string[] args)
		{
			IntPtr hWnd = NativeMethods.FindWindow(null, "QStarter".GetHashCode().ToString());
			if (hWnd != IntPtr.Zero) {
				NativeMethods.ShowWindow(hWnd, 1);
				NativeMethods.SetForegroundWindow(hWnd);
				System.Environment.Exit(0);
			}
			else
			{
				Application.EnableVisualStyles();
				Application.SetCompatibleTextRenderingDefault(false);
				Application.Run(new MainForm());
			}
		}
	}
}
